<%--
  用户添加页面
  包含用户注册表单
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户添加</title>
    <style>
        /* 表单容器样式 */
        .form-container {
            width: 100%;
            max-width: 600px;
            background-color: #FFF9C4; /* 淡黄表单背景 */
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        /* 表单标题样式 */
        .form-title {
            color: #5D4037;
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 10px;
            border-bottom: 2px solid #FFECB3;
        }

        /* 表单输入框样式 */
        .form-control {
            width: 100%;
            padding: 10px;
            border: 1px solid #FFECB3;
            border-radius: 4px;
            background-color: #FFFDE7;
            box-sizing: border-box;
        }

        /* 提交按钮样式 */
        .btn-submit {
            background-color: #FFECB3;
            color: #5D4037;
            border: none;
            padding: 12px 0;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            width: 100%;
            transition: background-color 0.3s;
            font-weight: bold;
        }
    </style>
    <!-- 引入Bootstrap图标 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.0/font/bootstrap-icons.css">
</head>
<body>
<div class="container">
    <div class="form-container">
        <h2 class="form-title"><i class="bi bi-person-plus"></i> 添加用户</h2>
        <!-- 用户添加表单 -->
        <form action="${pageContext.request.contextPath}/user/add" method="post">
            <div class="form-group">
                <label for="username" class="form-label">用户名</label>
                <input type="text" class="form-control" id="username" name="username" required placeholder="请输入用户名">
            </div>

            <div class="form-group">
                <label for="password" class="form-label">密码</label>
                <input type="password" class="form-control" id="password" name="password" required placeholder="请输入密码">
            </div>

            <div class="form-group">
                <label for="email" class="form-label">邮箱</label>
                <input type="email" class="form-control" id="email" name="email" required placeholder="请输入邮箱地址">
                <small class="text-muted">例如: user@example.com</small>
            </div>

            <div class="form-group">
                <button type="submit" class="btn btn-primary btn-submit">
                    <i class="bi bi-check-circle"></i> 提交
                </button>
            </div>
        </form>
    </div>
</div>
</body>
</html>